package Demo;

/**
 * @author げっしょく
 * @date 2021/7/27
 */
public class Test2 {
    public static void main(String[] args) {
        int[][] arr = {{0, 1, 2}, {3, 4, 5}, {6, 7, 8}};
        int i,j,b,c;
        lo:for (i = 0, b = 2; i < 3 | b >= 0; i++, b--) {
            for(j = 0,c =2; j < 3 | c>=0;j++,c--){
                if(i == b && j == c){
                    break lo;
                }
                int tum = arr[i][j];
                arr[i][j] = arr[b][c];
                arr[b][c] = tum;
            }

        }
        for (int k = 0; k < 3; k++) {
            for (int d = 0; d < 3; d++) {
                System.out.println(arr[k][d]);
            }
        }
    }
}
